It is known to store in memory a matrix in which a plurality of data values constituting each row of the matrix are located at adjacent memory locations in the memory. Each row of the matrix comprises a plurality of data values. The sequence of data values in the row is therefore predetermined by the order in which they are stored in memory. In a matrix transpose operation, it is required to interchange row and column values so that sequential data values in a row are located in the transposed matrix as sequential column values in a column. At present, such a matrix transpose operation can only be carried out by retrieving individual data values from memory, temporarily storing them in separate registers and writing them back to memory in a different location. Operations of this nature require repeated accesses to memory and a long sequence of instructions. The instruction sequence takes up space in memory. It is desirable to reduce where possible the length of instruction sequences. It is also desirable to minimise memory accesses, because these are slow operations.